package com.hinnotek.amoeba.ui.activity.old

import android.os.Bundle
import android.view.View
import com.lee.common.base.BaseActivity
import com.hinnotek.amoeba.R
import com.hinnotek.amoeba.databinding.ActivitySellListBinding
import com.hinnotek.amoeba.utilities.IntentUtils

class SellListActivity : BaseActivity<ActivitySellListBinding>(), View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setLeftVisible(true)
        setTitle("销售列表")

        setContentView(R.layout.activity_sell_list)
    }

    override fun initVew() {
        bindingView.rlProjectTracking
        bindingView.rlPurchaseRequisition.setOnClickListener(this)
        bindingView.rlProjectTracking.setOnClickListener(this)
        bindingView.rlWipeOut.setOnClickListener(this)
        bindingView.rlInstall.setOnClickListener(this)
    }

    override fun setData() {
    }

    override fun onClick(v: View) {
        when (v.id) {
            R.id.rl_purchase_requisition -> {
                val bundle = Bundle()
                bundle.putString("purchase_type_to", "market")
                IntentUtils.startActivity(
                    mContext,
                    SellPurchaseRequisitionActivity::class.java,
                    bundle
                )
            }
            R.id.rl_project_tracking -> IntentUtils.startActivity(
                mContext,
                PTCreateUserListActivity::class.java
            )
            R.id.rl_wipe_out -> {
                val bundle1 = Bundle()
                bundle1.putInt("applyUserType", 1)
                bundle1.putString("purchase_type_to", "market")
                IntentUtils.startActivity(mContext, WipeOutListActivity::class.java, bundle1)
            }
            R.id.rl_install -> IntentUtils.startActivity(
                mContext,
                TechnologyInstallListActivity::class.java
            )
        }
    }
}